Task Based Help > Customize Page Layout > Defining and Using Global Constants |
There is no special mechanism for defining and using global constants in a report, but you can add hidden fields to the report and use their values as global parameters. To do this, complete the following steps:
Property |
Setting |
Field.Name |
linesPerPage |
Field.Text |
14 |
Field.Visible |
False |
The VBScript Editor appears.
cnt = cnt + 1
detail.forcepagebreak = "none"
if cnt >= linesPerPage then
cnt = 0
detail.forcepagebreak = "after"
endif
Note that the value in the linesPerPage field can be set prior to rendering the report, by changing the field's Text property.
Sample Report Available: For the complete report, see report "08: Global Constant" in the CommonTasks.xml report definition file, which is available for download from the CommonTasks sample on the ComponentOne HelpCentral Sample page. |